home *** CD-ROM | disk | FTP | other *** search
/ Publication 19 / Publication_19_19xx_Civitas_de_Side_B.d64 / flop v1.1-reloc (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  622b  |  21 lines

  1. 1 print"[147]flop v1.1-relocator"
  2. 2 input"hi program     (hex)";in$:gosub17:p1=er:p1$=in$:ifer<0goto2
  3. 3 input"hi read-puffer (hex)";in$:gosub17:p2=er:p2$=in$:ifer<0goto3
  4. 4 input"hi dir-puffer  (hex)";in$:gosub17:p3=er:p3$=in$:ifer<0goto4
  5. 5 open1,8,8,"flop v1.1 c00405,p,r"
  6. 6 open2,8,9,"flop v1.1 c10608,p,r"
  7. 7 open3,8,1,"flop v1.1 "+p1$+p2$+p3$
  8. 8 get#1,i1$:i1=asc(i1$+chr$(0))
  9. 9 get#2,i2$:i2=asc(i2$+chr$(0))
  10. 10 df=i2-i1:o=i1:sa=st
  11. 11 ifdf=1theno=p1+(i1-192)
  12. 12 ifdf=2theno=p2+(i1-4)
  13. 13 ifdf=3theno=p3+(i1-5)
  14. 14 print#3,chr$(o);:ifsa=0goto8
  15. 15 close1:close2:close3
  16. 16 end
  17. 17 er=0:e2=-1:fora=1to2:a$=mid$(in$,a,1):forb=1to16
  18. 18 ifa$=mid$("0123456789abcdef",b,1)thene2=b-1
  19. 19 next:ife2<0thener=-1:return
  20. 20 er=16*er+e2:next:return
  21.